home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3c / mq_notify.z / mq_notify
Text File  |  1998-10-30  |  5KB  |  133 lines

  1.  
  2.  
  3.  
  4. mmmmqqqq____nnnnoooottttiiiiffffyyyy((((3333cccc))))                                                    mmmmqqqq____nnnnoooottttiiiiffffyyyy((((3333cccc))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _mmmm_qqqq______nnnn_oooo_tttt_iiii_ffff_yyyy - register message notification request
  10.  
  11. CCCC SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_mmmm_qqqq_uuuu_eeee_uuuu_eeee_...._hhhh_>>>>
  13.  
  14.      _iiii_nnnn_tttt _mmmm_qqqq______nnnn_oooo_tttt_iiii_ffff_yyyy _((((_mmmm_qqqq_dddd______tttt _m_q_d_,,,, _cccc_oooo_nnnn_ssss_tttt _ssss_tttt_rrrr_uuuu_cccc_tttt _ssss_iiii_gggg_eeee_vvvv_eeee_nnnn_tttt _****_n_o_t_i_f_i_c_a_t_i_o_n_))))_;;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _mmmm_qqqq______nnnn_oooo_tttt_iiii_ffff_yyyy registers a message _n_o_t_i_f_i_c_a_t_i_o_n request with the message queue
  18.      named by _m_q_d. A message notification is an asynchronous event which
  19.      informs a process of a message that has arrived on a previously empty
  20.      queue.  A message queue transition from empty to non-empty will result in
  21.      a _n_o_t_i_f_i_c_a_t_i_o_n delivery to the process that registered the request.
  22.  
  23.      There can be only one message notification registered with a queue at any
  24.      given time.
  25.  
  26.      If the _s_i_g_e_v__n_o_t_i_f_y member of _n_o_t_i_f_i_c_a_t_i_o_n is SIGEV_THREAD then the
  27.      function _s_i_g_e_v__n_o_t_i_f_y__f_u_n_c_t_i_o_n will be called by a new thread (see
  28.      pthreads(5)) with _s_i_g_e_v__v_a_l_u_e as the argument.  This thread is created
  29.      when the event arrives with the attributes specified in
  30.      _s_i_g_e_v__n_o_t_i_f_y__a_t_t_r_i_b_u_t_e_s except that it is automatically detached.  The
  31.      calling process should ensure there are sufficient resources to create
  32.      the thread.
  33.  
  34.      If the _n_o_t_i_f_i_c_a_t_i_o_n argument is _NNNN_UUUU_LLLL_LLLL and the calling process already has
  35.      a pending notification request, then the pending request will be cleared.
  36.      The message queue will then be available for notification registration.
  37.  
  38.      Once a message notification is delivered to a process, or the requesting
  39.      process exits before receiving the notification, then the request is
  40.      cleared.  The message queue will then be available for notification
  41.      registration.
  42.  
  43.      If a message arrives at an empty queue, and a process is blocked in
  44.      _mmmm_qqqq______rrrr_eeee_cccc_eeee_iiii_vvvv_eeee waiting for a message, then the waiting process will receive
  45.      the message.  In this case, the notification request registered with the
  46.      queue will have no effect.
  47.  
  48.      _mmmm_qqqq______nnnn_oooo_tttt_iiii_ffff_yyyy will fail if one or more of the following conditions are true:
  49.  
  50.      [EBADF]        The message queue descriptor, _m_q_d, is not valid.
  51.  
  52.      [EBUSY]        A notification request is already registered with the
  53.                     queue.
  54.  
  55.      [EINTR]        A signal interrupted the _mmmm_qqqq______nnnn_oooo_tttt_iiii_ffff_yyyy function call.
  56.  
  57.      [EAGAIN]       Insufficient memory to implement the SIGEV_THREAD service
  58.                     for _n_o_t_i_f_i_c_a_t_i_o_n.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmqqqq____nnnnoooottttiiiiffffyyyy((((3333cccc))))                                                    mmmmqqqq____nnnnoooottttiiiiffffyyyy((((3333cccc))))
  71.  
  72.  
  73.  
  74. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  75.      _mmmm_qqqq______oooo_pppp_eeee_nnnn(3c), _iiii_nnnn_tttt_rrrr_oooo(3c), _mmmm_qqqq______uuuu_nnnn_llll_iiii_nnnn_kkkk(3c), _mmmm_qqqq______rrrr_eeee_cccc_eeee_iiii_vvvv_eeee(3c), _mmmm_qqqq______ssss_eeee_nnnn_dddd(3c),
  76.      _mmmm_qqqq______gggg_eeee_tttt_aaaa_tttt_tttt_rrrr(3c)
  77.  
  78. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  79.      Upon successful completion, a value of 0 is returned.  Otherwise, a value
  80.      of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate the error.
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.